<?php
/*
	插件概览
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
set_html('title','信息查询平台');
if($_RQ['op']=='get'){
	$return['post']=array();
	exi($return);
}
if($_RQ['op']=='post'){
	$post=get_postdata();
	if(!$post['sn'] || !$post['codenumber']){
		exi('请输入培训证书编号和身份证号码','error');
	}
	$cert=pdo_get('jy_peiedu_cert',array('uniacid'=>$_SESSION['uniacid'],'sn'=>$post['sn']));
	if(!$cert){
		exi('培训证书编号不存在！','error');
	}
	if($cert['codenumber']!=$post['codenumber']){
		exi('培训证书编号和身份证号码不匹配！','error');
	}
	$_SESSION['certid']=$cert['id'];
	//绝对地址，会刷新页面
	$url='jy_peiedu/cert//certid='.$cert['id'];
	exi('','',$url);
	
}